﻿<!doctype html>
<html class="no-js" lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="~{/layout/layout}" xmlns:font-size="http://www.w3.org/1999/xhtml">
<style type="text/css">
    .col-lg-6 col-md-6 col-sm-12 ul li {
        float: left;
        width: 500px;
    }
</style>
<head>
<body>
<div id="content" layout:fragment="content">

    <div class="container">
        <div class="row">
            <div class="col-lg-3 col-md-3 hidden-sm hidden-xs">
                <ul class="list-group">
                    <li class="list-group-item">
                        <a href="#" class="list-group-item">
                            个人信息
                        </a>
                    </li>
                    <li class="list-group-item">
                        <a href="#" class="list-group-item">
                            密码修改
                        </a>
                    </li>
                    <li class="list-group-item">
                        <a href="#" class="list-group-item">
                            收货地址
                        </a>
                    </li>
                </ul>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-12">

                <!-- <label class="sr-only" for="inputHelpBlock">Input with help text</label>
                    <input type="text" id="inputHelpBlock" class="form-control" aria-describedby="helpBlock"> -->
                <h3>收货地址</h3>
                <br>
                <button type="submit" class="btn btn-primary">新增地址</button>
                <br>
                <!-- <form >
                    <div class="control-group">
                      <label class="control-label" for="inputIcon">Email</label>
                       <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">
                    </div>
                        <button type="submit" class="btn btn-primary">保存</button>
                 </form> -->
                <br>
                <from action="/user/getPW" method="get">
                    <ul>
                        <li th:each="s : ${selectAddress}" style="float: left;line-height:2em;padding-left: 20px;"
                            id="li">
                            <p style="font-size:1.5em;" s.>收件人：</p>
                            <samp style="font-size: 1.5em;" th:text="${s.people}"></samp>
                            <p style="font-size:1.5em;" s.>电话号码：</p>
                            <samp style="font-size: 1.5em;" th:text="${s.phone}"></samp>
                            <p style="font-size:1.5em;" s.>详细地址：</p>
                            <samp style="font-size: 1.5em;" th:text="${s.content}"></samp>
                            <br>
                            <div>
                                <div style="float: right;margin-top: 13px;">
                                    <button type="submit" class="btn btn-primary" id="modify">修改</button>
                                </div>

                                <div style="float: left;padding-right: 50px;">
                                    <input type="checkbox" style="width: 20px;display: block; " name="defaultAddress">
                                    <p style="margin-top: -35px;margin-left: 26px;">设置为默认地址</p>
                                </div>
                            </div>
                        </li>
                    </ul>
                </from>
            </div>
            <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">

            </div>
        </div>
    </div>

</div>
<script layout:fragment="script">
    var config = {pageTitle: "收货地址", navActive: "navProduct"};
    var cartId = 0;
    $(function () {
        document.title = config.pageTitle;
        $("#" + config.navActive).addClass("active");
    });
    _init_area();
    var Gid = document.getElementById('s_county');
    var showArea = function () {
        document.getElementById('show').innerHTML = "<h3>省" + document.getElementById('s_province').value + " - 市" +
            document.getElementById('s_city').value + " - 县/区" +
            document.getElementById('s_county').value + "</h3>"
    };
    Gid.setAttribute('onchange', 'showArea()');


    // $.ajax({
    //     type:"get",
    //     url: //你的请求程序页面随便啦
    //     data:"asd";//请求需要发送的处理数据
    // success:function(msg){
    //     if (msg) {//根据返回值进行跳转
    //         window.location.href = '你的跳转的目标地址';
    //     }
    // }

</script>
</body>
</html>